﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using DAL.Connect;

public partial class TrangChinh : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string searchString = Request.QueryString["ChuoiTimKiem"] ?? "";
            if (searchString != "")
                txtKey.Text = searchString;
        }
    }
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        btnSearch.Click += new EventHandler(btnSearch_Click);
    }
    void btnSearch_Click(object sender, EventArgs e)
    {
        string searchString = txtKey.Text.Trim();
        if (searchString.Length > 0)
            Response.Redirect(Link.TimKiem(searchString, "1"));
    }
}
